package cn.njyd.corejava.thread.myday02;

public class DaemonThread {
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
            while(true){
                System.out.println(Thread.currentThread().getName()+"在运行");
            }
        });

        t1.setDaemon(true);
        t1.start();

        for (int i=1;i<=100;i++) {
            System.out.println(Thread.currentThread().getName()+"也在运行"+i);
        }

    }
}
